#include <iostream>
#include <cstring>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

#ifndef __M_LEVEL_H__
#define __M_LEVEL_H__

using std::string;

namespace ad_log
{
    class LogLevel
    {
    public:
        enum class level
        {
            DEBUG,
            INFO,
            WARN,
            ERROR,
            FATAL,
            OFF,
        };

        static string toString(const level le)
        {
            switch (le)
            {
                case level::DEBUG:  return "DEBUG";
                case level::INFO:  return "INFO";
                case level::WARN:  return "WARN";
                case level::ERROR:  return "ERROR";
                case level::FATAL:  return "FATAL";
                case level::OFF:  return "OFF";
                default: return "";
            }
        }
    };
}

#endif